<template>
	<view>
		<view class="brand_box">
			<view class="brand_item" v-for="item in dataList" :key="item.pk_id" @click="openDetail(item)">
				<view class="img_main">
					<view class="img_box"><image class="img" :src="item.logo"></image></view>
				</view>
				<view class="title u-line-1">{{ item.name }}</view>
			</view>
		</view>
		<sww-load-more :params="dataListParams" @load="_load_data"></sww-load-more>
	</view>
</template>

<script>
import { pagingMixin } from '@/mixins/pagingMixin';
export default {
	mixins: [pagingMixin],
	components: {},
	data() {
		return {
			detail: {}
		};
	},
	onLoad() {
		this.$initPage();
	},
	onReachBottom() {
		this._load_data();
	},
	methods: {
		$initPage() {
			this._init_data('GetProductBrandList',{page_size:30});
		},
		openDetail(item) {
			this.$linkTo(`/package/brand/brandDetail/index?id=${item.pk_id}`);
		}
	}
};
</script>

<style scoped lang="scss">
.brand_box {
	display: flex;
	align-items: center;
	padding: 0 8rpx;
	flex-wrap: wrap;
	.brand_item {
		width: 25%;
		padding: 0 14rpx;
		color: #000;
		margin-bottom: 30rpx;
		.img_main {
			padding: 0 10rpx;
			width: 100%;
			.img_box {
				width: 100%;
				padding-bottom: 100%;
				position: relative;
				.img {
					position: absolute;
					top: 0;
					left: 0;
					width: 100%;
					height: 100%;
					border-radius: 50%;
				}
			}
		}
		.title {
			margin-top: 14rpx;
			font-size: 24rpx;
			text-align: center;
		}
	}
}
</style>
